{include file="public/head"}
<style>
.list-group-item{
    font-size: 14px;
    padding:.2rem 1rem;
}
</style>
<body>
    <header class="aui-header-default aui-header-fixed aui-header-bg">
    <a href="javascript:history.go(-1);" class="aui-header-item">
        <i class="aui-icon aui-icon-back-white"></i>
    </a>
    <div class="aui-header-center aui-header-center-clear">
        <div class="aui-header-center-logo">
            <div class="aui-car-white-Typeface" style="color:black;font-weight: bold;">订单详情</div>
        </div>
    </div>
    <a href="#" class="aui-header-item-icon"   style="min-width:0">
<!--        <i class="aui-icon aui-icon-search"></i>-->
    </a>
</header>
<div class="aui-myOrder-content" style="font-size:16px">

    <div class="gray-bg dashbard-1">
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-sm-1"></div>
                <div class="col-sm-10">
                    <div class="row">
                        <ul class="list-group">
                            <li class="list-group-item active" style="background: #e0e0e0;border-color: #e0e0e0;color: black;padding:.2rem;font-size:20px">收货信息</li>
                            <li class="list-group-item">用户账号：{$UserInfo.username}</li>
                            <li class="list-group-item">收件姓名：{$OrderInfo.name}</li>
                            <li class="list-group-item">联系电话：{$OrderInfo.phone}</li>
                            <li class="list-group-item">收件地址：{$OrderInfo.address}</li>
                        </ul>
                    </div>

                    <div class="row">
                        <ul class="list-group">
                            <li class="list-group-item active" style="background: #e0e0e0;border-color: #e0e0e0;color: black;padding:.2rem;font-size:20px">订单信息</li>
                            <li class="list-group-item">
                                <div class="row">
                                    <div class="col-sm-6">订单编号：{$OrderInfo.order_id}</div>
                                    <div class="col-sm-6" style="color: green">订单状态：
                                        {if condition="$OrderInfo.status eq 0"}待付款
                                        {elseif condition="$OrderInfo.status eq 1" /}待发货
                                        {elseif condition="$OrderInfo.status eq 2" /}待收货
                                        {elseif condition="$OrderInfo.status eq 3" /}已完成
                                        {elseif condition="$OrderInfo.status eq 4" /}待拼团
                                        {elseif condition="$OrderInfo.status eq 5" /}拼团成功
                                        {elseif condition="$OrderInfo.status eq 11" /}待退款
                                        {elseif condition="$OrderInfo.status eq 12" /}已退款
                                        {elseif condition="$OrderInfo.status eq 6" /}<font style="color:red">拼团失败</font>
                                        {/if}
                                    </div>
                                </div>
                            </li>

                            <li class="list-group-item">
                                {volist name='GoodsInfo' id='val'}
                                <div class="row">
                                    <div class="col-sm-6">商品名称：{$val.name}</div>
                                    <div class="col-sm-6">购买数量：{$val.num}{$val.unit}</div>
                                </div>
                                {/volist}
                            </li>
                            <li class="list-group-item">
                                <div class="row">
                                    <div class="col-sm-6">商品总价：{$OrderInfo.amount}元</div>
                                    <div class="col-sm-6">下单时间：{$OrderInfo.add_time|date="Y-m-d H:i:s",###}</div>
                                    <div class="col-sm-6">支付时间：{if condition="$OrderInfo.pay_time"}
                                        {$OrderInfo.pay_time|date="Y-m-d H:i:s",###}
                                        {else/}
                                        未支付
                                        {/if}</div>
                                </div>
                            </li>
                            <li class="list-group-item">
                                <div class="row">
                                    <div class="col-sm-6">支付金额：{$OrderInfo.pay_amount}元</div>
                                    <div class="col-sm-6" style="color: red">支付方式：
                                        {if condition="$OrderInfo.pay_type eq 1"}奖金支付
                                        {elseif condition="$OrderInfo.pay_type eq 2"}奖金+炁点支付
                                        {elseif condition="$OrderInfo.pay_type eq 3"}余额支付
                                        {elseif condition="$OrderInfo.pay_type eq 9"}微信支付
                                        {elseif condition="$OrderInfo.pay_type eq 4"}电子钱包+炁点支付
                                        {else/}未支付
                                        {/if}
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>

                    <div class="row">
                        <ul class="list-group">
                            <li class="list-group-item active" style="background: #e0e0e0;border-color: #e0e0e0;color: black;padding:.2rem;font-size:20px">备注信息</li>
                            <li class="list-group-item">
                                {if condition="$OrderInfo.remarks eq ''"}暂无备注信息
                                {else/}{$OrderInfo.remarks}
                                {/if}
                            </li>
                        </ul>
                    </div>
                    
                    {if condition="$OrderInfo.order_type eq 5"}
                    <div class="row" style="margin-top:1rem">
                        <ul class="list-group">
                            <li class="list-group-item active" style="background: #e0e0e0;border-color: #e0e0e0;color: black;padding:.2rem;font-size:20px">参团者</li></li>
                            <li class="list-group-item"  style="width:100%">
                                {volist name="caninfo" id="v"}
                                    <img src="{$v.head_url}" alt="" style="width:18%;display:inline;border-radius:50%;padding:.5rem"/>
                                {/volist}
                            </li>
                        </ul>
                    </div>
                    <div class="row">
                        <ul class="list-group">
                            <li class="list-group-item active" style="background: #e0e0e0;border-color: #e0e0e0;color: black;padding:.2rem;font-size:20px">中奖者</li>
                            <li class="list-group-item" style="width:100%">
                                {volist name="zhonginfo" id="val"}
                                    <img src="{$val.head_url}" alt="" style="width:18%;display:inline;border-radius:50%;padding:.5rem"/>
                                {/volist}
                            </li>
                        </ul>
                    </div>
                    {/if}
                </div>
                <div class="col-sm-1"></div>
            </div>
        </div>
    </div>


</div>
<script src="__STATIC__/Admin/js/jquery-2.1.1.min.js"></script>
<script src="__STATIC__/Admin/js/bootstrap.min.js?v=3.4.0"></script>
<script src="__STATIC__/Admin/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="__STATIC__/Admin/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="__STATIC__/Admin/layer/layer.js"></script>
<script>
    $('form').submit(function (e) {
        e.preventDefault();
        $.ajax({
            type:"post",
            url:"{:url('User/UserEdit')}",
            data:{
                id:$('#id').val(),
                name:$('#name').val(),
                phone:$('#phone').val(),
                id_card:$('#id_card').val(),
                wechat:$('#wechat').val(),
                wechat_openid:$('#wechat_openid').val(),
                remark:$('#remark').val(),
                recommend:$('#recommend').val(),
            },
            dataType:"json",
            success:function(data){
                if(data.status == 1){
                    layer.msg(data.message,{icon: 6,time:1500},function () {
                        window.top.location.reload();
                    });
                }else{
                    layer.msg(data.message,{icon: 5,time:1500});
                }
            }
        })
    })
</script>
</body>

</html>